import request from '@/axios/axios'

// 异常记录列表
export function getList(query) {
  return request({
    url: 'mqtt/authorization/exception/page',
    method: 'post',
    data: query
  })
}

// 处理意见
export function update(query) {
  return request({
    url: 'mqtt/authorization/exception/submit',
    method: 'post',
    data: query
  })
}

// 异常记录数量统计
export function statistics(query) {
  return request({
    url: 'mqtt/authorization/exception/statistics',
    method: 'get',
    params: query
  })
}

// 导出异常记录
export function exports(query) {
  return request({
    url: 'mqtt/authorization/exception/export',
    method: 'post',
    data: query,
    responseType: 'blob' // 强制axios将响应视为一个BLOB
  })
}

// 异常记录查询
export function exceptionDetail(query) {
  return request({
    url: 'mqtt/authorization/exception/exception-detail',
    method: 'post',
    data: query
  })
}
